<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\massage\model;

class ShopCarte extends \app\BaseModel
{
    protected $name = "massage_service_shop_carte";
    public static function add($input)
    {
        $input["create_time"] = time();
        return self::insert($input);
    }
    public static function getInfo($where, $field = "*")
    {
        return self::where($where)->field($field)->find();
    }
    public static function getList($where, $page = 10)
    {
        return self::where($where)->field("id,name,sort,status,create_time")->order("sort desc,create_time desc")->paginate($page)->each(function ($item) {
            $item["create_time"] = date("Y-m-d H:i:s", $item["create_time"]);
            return $item;
        })->toArray();
    }
    public static function getListNoPage($where)
    {
        return self::where($where)->field("id,name")->order("sort desc")->select();
    }
}

?>